Skip to content

Update Pages deployment to use staging directory - #290

Merged
jackgranatowski merged 1 commit into
mainfrom
claude/charming-ritchie-jb1q8u
Jun 9, 2026
Merged

Update Pages deployment to use staging directory#290
jackgranatowski merged 1 commit into
mainfrom
claude/charming-ritchie-jb1q8u

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Modified the GitHub Pages deployment workflow to stage build artifacts in a _site directory before uploading, rather than uploading the build output directly.

Key Changes

  • Added a new "Stage for Pages" step that creates a _site/configurator directory and copies the built configurator distribution files into it
  • Updated the Pages artifact upload step to reference the _site directory instead of configurator/dist

Implementation Details

This change allows for a more flexible deployment structure where multiple artifacts or projects can be staged in the _site directory before being published to GitHub Pages. The configurator build output is now nested under _site/configurator/ rather than being uploaded as the root artifact, which enables better organization if additional content needs to be deployed alongside it in the future.

https://claude.ai/code/session_01LnGSUomuCzuzFSP9ST9PZo

Summary by CodeRabbit

Chores

  • Updated configurator deployment path structure on GitHub Pages for proper directory organization.

The workflow was uploading configurator/dist/ as the Pages root, so the
app landed at /SLASHED/ instead of /SLASHED/configurator/. Stage the
build into a _site/configurator/ subdirectory before uploading so the
live URL matches the intended /configurator/ path.

https://claude.ai/code/session_01LnGSUomuCzuzFSP9ST9PZo
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The deploy-configurator workflow is updated to stage the configurator static build output into a _site/configurator directory before uploading a GitHub Pages artifact. The artifact upload path changes from configurator/dist to the staged _site directory.

Changes

GitHub Pages staging for configurator

Layer / File(s) Summary
Pages staging for configurator deployment
.github/workflows/deploy-configurator.yml
The build job adds a "Stage for Pages" step that creates _site/configurator and copies configurator/dist/ contents into it. The "Upload Pages artifact" step is updated to upload the staged _site directory instead of uploading configurator/dist directly.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the Pages deployment workflow to use a staging directory (_site) instead of uploading directly from the build output.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/charming-ritchie-jb1q8u

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy-configurator.yml:
- Around line 51-56: The Pages deployment now serves the app under
/configurator/, so update and verify the configurator build to use the base-path
environment variables injected by the actions/configure-pages step: inspect and,
if missing, update the configurator's build config (e.g., vite.config.js ->
base, next.config.js -> assetPrefix, webpack config -> publicPath or rollup ->
base) to read process.env (e.g., BASE_URL, PUBLIC_URL or the configure-pages
variables) and ensure the npm build script in configurator/package.json passes
those env vars during the build; also confirm the workflow still stages the
output into _site/configurator (the "Stage for Pages" step) after the build so
asset URLs resolve correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 23bc00bb-04aa-41b0-88be-acfe9e0bddef

📥 Commits

Reviewing files that changed from the base of the PR and between 4d6fb51 and 630f6c1.

📒 Files selected for processing (1)
  • .github/workflows/deploy-configurator.yml

Comment on lines +51 to +56
- name: Stage for Pages
run: mkdir -p _site/configurator && cp -r configurator/dist/. _site/configurator/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: configurator/dist
path: _site

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Verify the configurator build respects the nested deployment path.

The configurator will now be deployed at /SLASHED/configurator/ instead of /SLASHED/. The actions/configure-pages step (line 44) typically sets environment variables for the base URL, but you must verify that the configurator's build process actually uses these variables to configure the base path for asset references (JS, CSS, images, etc.).

If the build doesn't use the correct base path, the deployed app will have broken asset URLs resulting in 404 errors.

Run the following script to check if the configurator's build configuration uses the base path:

#!/bin/bash
# Description: Check configurator build config for base path configuration

# Look for common build config files and check if they reference base path or environment variables
echo "=== Checking for build configuration files ==="
fd -t f 'vite.config|next.config|webpack.config|rollup.config' configurator/

echo -e "\n=== Checking for base path configuration in build configs ==="
rg -n -C3 --type-add 'config:*.{js,ts,mjs,cjs}' --type config \
  -e 'base:?\s*process\.env' \
  -e 'basePath' \
  -e 'BASE_URL' \
  -e 'publicPath' \
  configurator/

echo -e "\n=== Checking package.json build scripts ==="
cat configurator/package.json | jq -r '.scripts | to_entries[] | select(.key | test("build|prebuild")) | "\(.key): \(.value)"'

Expected: The configurator should use environment variables set by configure-pages (such as GITHUB_PAGES, base URL, etc.) to configure the base path during the build step.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-configurator.yml around lines 51 - 56, The Pages
deployment now serves the app under /configurator/, so update and verify the
configurator build to use the base-path environment variables injected by the
actions/configure-pages step: inspect and, if missing, update the configurator's
build config (e.g., vite.config.js -> base, next.config.js -> assetPrefix,
webpack config -> publicPath or rollup -> base) to read process.env (e.g.,
BASE_URL, PUBLIC_URL or the configure-pages variables) and ensure the npm build
script in configurator/package.json passes those env vars during the build; also
confirm the workflow still stages the output into _site/configurator (the "Stage
for Pages" step) after the build so asset URLs resolve correctly.

@jackgranatowski
jackgranatowski merged commit 91d1d21 into main Jun 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants